package com.kproduce.roundcorners;

import com.kproduce.roundcorners.util.RoundHelper;
import ohos.agp.colors.RgbColor;
import ohos.agp.components.AttrSet;
import ohos.agp.components.DirectionalLayout;
import ohos.agp.components.element.ShapeElement;
import ohos.agp.utils.Color;
import ohos.app.Context;

/**
 * @author kuanggang on 2019/12/10
 */
public class RoundLinearLayout extends DirectionalLayout {

    public RoundLinearLayout(Context context) {
        this(context, null);
    }

    public RoundLinearLayout(Context context, AttrSet attrs) {
        this(context, attrs, "-1");
    }

    public RoundLinearLayout(Context context, AttrSet attrs, String defStyleAttr) {
        super(context, attrs, defStyleAttr);
        ShapeElement shapeElement1 = new ShapeElement();
        shapeElement1.setCornerRadiiArray(new float[]{75, 75, 0, 0, 0, 0, 80, 80});
        shapeElement1.setStroke(10, RgbColor.fromArgbInt(Color.GRAY.getValue()));
        this.setForeground(shapeElement1);
    }

}
